import '../ai/ai_date_entity.dart';

class KingRankEntity {
  List<DayList>? dayList;
  List<KingRankItem>? rankList;

  KingRankEntity({this.dayList, this.rankList});

  KingRankEntity.fromJson(Map<String, dynamic> json) {
    if (json['days'] != null) {
      dayList = <DayList>[];
      json['days'].forEach((v) {
        dayList!.add(new DayList.fromJson(v));
      });
    }
    if (json['list'] != null) {
      rankList = <KingRankItem>[];
      json['list'].forEach((v) {
        rankList!.add(new KingRankItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.dayList != null) {
      data['days'] = this.dayList!.map((v) => v.toJson()).toList();
    }
    if (this.rankList != null) {
      data['list'] = this.rankList!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}


class KingRankItem {
  int? id;
  String? logo;
  String? name;
  int? score;
  String? sort;
  String? statDate;
  int? type;
  String? updateTime;
  String? userId;

  KingRankItem(
      {this.id,
        this.logo,
        this.name,
        this.score,
        this.sort,
        this.statDate,
        this.type,
        this.updateTime,
        this.userId});

  KingRankItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    logo = json['logo'];
    name = json['name'];
    score = json['score'];
    sort = json['sort'];
    statDate = json['statDate'];
    type = json['type'];
    updateTime = json['updateTime'];
    userId = json['userId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['logo'] = this.logo;
    data['name'] = this.name;
    data['score'] = this.score;
    data['sort'] = this.sort;
    data['statDate'] = this.statDate;
    data['type'] = this.type;
    data['updateTime'] = this.updateTime;
    data['userId'] = this.userId;
    return data;
  }
}